<?php
require 'includes/common.inc.php';
require_once 'includes/announce.class.php';
$a = new announce;
$pagesize = $M['pagesize'] ?  $M['pagesize'] : 15;
$page = $page ? $page : 1 ;
$announces = $a->listinfo($page,$pagesize,"WHERE passed=1");


$announceid = intval($announceid) ? intval($announceid) : '';

if($announceid)
{
	$annou = $a->getone($announceid);
	if($annou)
	{
		$a->update($announceid);
		@extract($annou);
	}
	
	$head['title'] = $annou['title'].'_公告';
	$head['keywords'] = '';
	$head['description'] = '';
	include template('view.html',$module);
}
else
{
	/*$annou = $a->show("WHERE passed=1");
	if($annou)
	{
		@extract($annou);
		$a->update($announceid);
	}*/
	$head['title'] = '公告';
	$head['keywords'] = '';
	$head['description'] = '';
	include template('index.html',$module);
}


?>